<template>
  <div class="select_link" style="margin-bottom:8px;">
    <div v-if="linkdata.name" class="select_btn select_check">
      <i class="el-icon-link"></i>
      <el-input size="small" :value="linkdata.name" disabled></el-input>
      <el-button size="small" type="text">修改</el-button>
    </div>
    <div v-else class="select_btn select_d">
      <i class="el-icon-link"></i>
      <span>选择链接</span>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    linkdata: {
      type: Object,
      default: function() {
        return {};
      }
    }
  }
};
</script>

<style lang="scss">
.select_check .el-input__inner {
  border: none;
  background: #fff !important;
  padding: 0 !important;
  color: #333333 !important;
}
.select_check .el-button {
  padding: 0 15px;
}
.select_link {
  background: #fff;
}

.select_btn {
  padding: 4px 6px;
  color: #2d8cf0;
  box-sizing: border-box;
  border: 1px solid #e9edef;
  background: #ffffff;
}
.select_d {
  display: flex;
  align-items: center;
}
.select_d .el-icon-link {
  padding: 0 6px 0 0;
}

.select_d:hover {
  border: 1px solid #2d8cf0;
}
.select_check {
  display: flex;
  align-items: center;
  padding: 0;
  .el-icon-link {
    padding: 0 6px;
    color: #333333;
  }
}
</style>
